package vooga.core;

/**
 * The player object stores the player's name and the status object.
 * In the future, the status and player classes might be combined
 * @author Jonathan Odom, Andrew
 * created 11-29
 */
public class Player {
	private Status myStatus;
	private String myName;
	
	/**
	 * Default name is Player, default status created
	 */
	public Player()
	{
		this("Player");
	}
	/**
	 * Create player with name and default status
	 * @param name the name of the player
	 */
	public Player(String name)
	{
		myName = name;
		myStatus = new Status();
	}
	/**
	 * Create a player
	 * @param name the name of the player
	 * @param status the status object for the player
	 */
	public Player(String name, Status status)
	{
		myName = name;
		myStatus = status;
	}
	
	/**
	 * Players name
	 * @return the players name
	 */
	public String getName()
	{
		return myName;
	}
	
	/**
	 * Allows access to the status object of the player sp
	 * scores, lives and data can be accessed for each player
	 * @return the status of player
	 */
	public Status getStatus()
	{
		return myStatus;
	}
	
	public void setStatus(Status status)
	{
		myStatus = status;
	}
	
	public void loadStatus(String filename)
	{
		myStatus = new Status(filename);
	}

}
